/**
 * 
 */

/**
 * @author zhongfang
 *
 */
public class PerfectNumber {
    public static boolean checkPerfectNumber(int num) {
    	if(num<=1)
    		return false;
        int result=0;
        for(int i=1;i<=Math.sqrt(num);i++){
            if(num%i==0){
                result+=i;
                result+=num/i;
            }
        }
        if(result==2*num){
            return true;
        }else{
            return false;
        }
    }
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		System.out.println(checkPerfectNumber(0));
	}

}
